package com.hqyj.crmdemo.service.impl;

import com.hqyj.crmdemo.entity.CustmerName;
import com.hqyj.crmdemo.entity.Orders;
import com.hqyj.crmdemo.entity.Report;
import com.hqyj.crmdemo.entity.SaleChance;
import com.hqyj.crmdemo.mapper.OrdersMapper;
import com.hqyj.crmdemo.service.IOrdersService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 何万林
 * @since 2022-10-17
 */
@Service
public class OrdersServiceImpl extends ServiceImpl<OrdersMapper, Orders> implements IOrdersService {

    @Autowired
    OrdersMapper mapper;

    @Override
    public List<Orders> queryAll() {
        List<Orders> saleChances = mapper.selectList(null);
        return saleChances;
    }

    @Override
    public Boolean add(Orders orders) {
        int insert = mapper.insert(orders);
        return insert > 0 ? true : false;
    }


}
